//
//  JCTest.h
//  JCSDK
//
//  Created by master on 16/2/25.
//  Copyright © 2016年 AdMaster. All rights reserved.
//

#import "JCValueTransformers.h"

@implementation JCBOOLToNSNumberValueTransformer

+ (Class)transformedValueClass
{
    return [@YES class];
}

+ (BOOL)allowsReverseTransformation
{
    return NO;
}

- (id)transformedValue:(id)value
{
    if ([value respondsToSelector:@selector(boolValue)]) {
        return [value boolValue] ? @YES : @NO;
    }

    return nil;
}

@end
